"""
Element UI主题配置
包含完整的Element UI颜色系统和主题变量定义
"""

# =============================================================================
# Element UI 官方颜色系统
# =============================================================================

class ElementColors:
    """Element UI 官方颜色常量"""
    
    # 主色 (Brand Color)
    PRIMARY = "#409EFF"
    
    # 辅助色 (Secondary Colors)
    SUCCESS = "#67C23A"    # 成功色
    WARNING = "#E6A23C"    # 警告色
    DANGER = "#F56C6C"     # 危险色
    INFO = "#909399"       # 信息色
    
    # 中性色 - 文本颜色 (Neutral Colors - Text)
    TEXT_PRIMARY = "#303133"      # 主要文本
    TEXT_REGULAR = "#606266"      # 常规文本
    TEXT_SECONDARY = "#909399"    # 次要文本
    TEXT_PLACEHOLDER = "#C0C4CC"  # 占位符文本
    
    # 中性色 - 边框颜色 (Neutral Colors - Border)
    BORDER_BASE = "#DCDFE6"        # 基础边框
    BORDER_LIGHT = "#E4E7ED"       # 浅色边框
    BORDER_LIGHTER = "#EBEEF5"     # 更浅边框
    BORDER_EXTRA_LIGHT = "#F2F6FC" # 极浅边框
    
    # 中性色 - 填充颜色 (Neutral Colors - Fill)
    FILL_BASE = "#F0F2F5"          # 基础填充
    FILL_LIGHT = "#F5F7FA"         # 浅色填充
    FILL_LIGHTER = "#FAFAFA"       # 更浅填充
    FILL_EXTRA_LIGHT = "#FAFCFF"   # 极浅填充
    
    # 中性色 - 背景颜色 (Neutral Colors - Background)
    BG_BASE = "#FFFFFF"            # 基础背景（白色）
    BG_PAGE = "#F2F3F5"            # 页面背景
    BG_OVERLAY = "#FFFFFF"         # 遮罩背景
    
    # 基础颜色 (Basic Colors)
    BLACK = "#000000"              # 基础黑色
    WHITE = "#FFFFFF"              # 基础白色
    TRANSPARENT = "transparent"    # 透明
    
    # 主色调色板 (Primary Color Palette)
    PRIMARY_LIGHT_1 = "#53A8FF"    # primary 浅色-1
    PRIMARY_LIGHT_2 = "#66B1FF"    # primary 浅色-2
    PRIMARY_LIGHT_3 = "#79BBFF"    # primary 浅色-3
    PRIMARY_LIGHT_4 = "#8CC5FF"    # primary 浅色-4
    PRIMARY_LIGHT_5 = "#A0CFFF"    # primary 浅色-5
    PRIMARY_LIGHT_6 = "#B3D8FF"    # primary 浅色-6
    PRIMARY_LIGHT_7 = "#C6E2FF"    # primary 浅色-7
    PRIMARY_LIGHT_8 = "#D9ECFF"    # primary 浅色-8
    PRIMARY_LIGHT_9 = "#ECF5FF"    # primary 浅色-9
    PRIMARY_DARK_1 = "#3A8EE6"     # primary 深色-1
    PRIMARY_DARK_2 = "#337ECC"     # primary 深色-2
    
    # 成功色调色板 (Success Color Palette)
    SUCCESS_LIGHT_1 = "#75CD47"
    SUCCESS_LIGHT_2 = "#82D954"
    SUCCESS_LIGHT_3 = "#90E461"
    SUCCESS_LIGHT_4 = "#9DEF6E"
    SUCCESS_LIGHT_5 = "#ABFA7B"
    SUCCESS_LIGHT_6 = "#B8FF88"
    SUCCESS_LIGHT_7 = "#C6FF95"
    SUCCESS_LIGHT_8 = "#D3FFA2"
    SUCCESS_LIGHT_9 = "#E1FFAF"
    SUCCESS_DARK_1 = "#5CAF34"
    SUCCESS_DARK_2 = "#529B2E"
    
    # 警告色调色板 (Warning Color Palette)
    WARNING_LIGHT_1 = "#EAAE4C"
    WARNING_LIGHT_2 = "#EEBA5C"
    WARNING_LIGHT_3 = "#F2C66C"
    WARNING_LIGHT_4 = "#F6D27C"
    WARNING_LIGHT_5 = "#FADA8C"
    WARNING_LIGHT_6 = "#FEE69C"
    WARNING_LIGHT_7 = "#FFF0AC"
    WARNING_LIGHT_8 = "#FFF8BC"
    WARNING_LIGHT_9 = "#FEFFCC"
    WARNING_DARK_1 = "#CF9236"
    WARNING_DARK_2 = "#B88230"
    
    # 危险色调色板 (Danger Color Palette)
    DANGER_LIGHT_1 = "#F78989"
    DANGER_LIGHT_2 = "#F8A6A6"
    DANGER_LIGHT_3 = "#F9C3C3"
    DANGER_LIGHT_4 = "#FAE0E0"
    DANGER_LIGHT_5 = "#FBEBEB"
    DANGER_LIGHT_6 = "#FCF2F2"
    DANGER_LIGHT_7 = "#FDF6F6"
    DANGER_LIGHT_8 = "#FEFAFA"
    DANGER_LIGHT_9 = "#FEFEFE"
    DANGER_DARK_1 = "#DD6161"
    DANGER_DARK_2 = "#C45656"
    
    # 信息色调色板 (Info Color Palette)
    INFO_LIGHT_1 = "#9FA6AB"
    INFO_LIGHT_2 = "#AFB3B8"
    INFO_LIGHT_3 = "#BFC0C5"
    INFO_LIGHT_4 = "#CFCDD2"
    INFO_LIGHT_5 = "#DFDADF"
    INFO_LIGHT_6 = "#EFE7EC"
    INFO_LIGHT_7 = "#FFF4F9"
    INFO_LIGHT_8 = "#FFFFF6"
    INFO_LIGHT_9 = "#FFFFFF"
    INFO_DARK_1 = "#82848A"
    INFO_DARK_2 = "#73767A"

# =============================================================================
# Element UI 默认主题配置
# =============================================================================

ELEMENT_DEFAULT_THEME = {
    "name": "element-default",
    "description": "Element UI 默认主题",
    "version": "1.0.0",
    
    # 颜色变量
    "colors": {
        # 主要颜色
        "primary": ElementColors.PRIMARY,
        "primary-light-1": ElementColors.PRIMARY_LIGHT_1,
        "primary-light-2": ElementColors.PRIMARY_LIGHT_2,
        "primary-light-3": ElementColors.PRIMARY_LIGHT_3,
        "primary-light-4": ElementColors.PRIMARY_LIGHT_4,
        "primary-light-5": ElementColors.PRIMARY_LIGHT_5,
        "primary-light-6": ElementColors.PRIMARY_LIGHT_6,
        "primary-light-7": ElementColors.PRIMARY_LIGHT_7,
        "primary-light-8": ElementColors.PRIMARY_LIGHT_8,
        "primary-light-9": ElementColors.PRIMARY_LIGHT_9,
        "primary-dark-1": ElementColors.PRIMARY_DARK_1,
        "primary-dark-2": ElementColors.PRIMARY_DARK_2,
        
        # 辅助颜色
        "success": ElementColors.SUCCESS,
        "success-light-1": ElementColors.SUCCESS_LIGHT_1,
        "success-light-2": ElementColors.SUCCESS_LIGHT_2,
        "success-light-3": ElementColors.SUCCESS_LIGHT_3,
        "success-light-4": ElementColors.SUCCESS_LIGHT_4,
        "success-light-5": ElementColors.SUCCESS_LIGHT_5,
        "success-light-6": ElementColors.SUCCESS_LIGHT_6,
        "success-light-7": ElementColors.SUCCESS_LIGHT_7,
        "success-light-8": ElementColors.SUCCESS_LIGHT_8,
        "success-light-9": ElementColors.SUCCESS_LIGHT_9,
        "success-dark-1": ElementColors.SUCCESS_DARK_1,
        "success-dark-2": ElementColors.SUCCESS_DARK_2,
        
        "warning": ElementColors.WARNING,
        "warning-light-1": ElementColors.WARNING_LIGHT_1,
        "warning-light-2": ElementColors.WARNING_LIGHT_2,
        "warning-light-3": ElementColors.WARNING_LIGHT_3,
        "warning-light-4": ElementColors.WARNING_LIGHT_4,
        "warning-light-5": ElementColors.WARNING_LIGHT_5,
        "warning-light-6": ElementColors.WARNING_LIGHT_6,
        "warning-light-7": ElementColors.WARNING_LIGHT_7,
        "warning-light-8": ElementColors.WARNING_LIGHT_8,
        "warning-light-9": ElementColors.WARNING_LIGHT_9,
        "warning-dark-1": ElementColors.WARNING_DARK_1,
        "warning-dark-2": ElementColors.WARNING_DARK_2,
        
        "danger": ElementColors.DANGER,
        "danger-light-1": ElementColors.DANGER_LIGHT_1,
        "danger-light-2": ElementColors.DANGER_LIGHT_2,
        "danger-light-3": ElementColors.DANGER_LIGHT_3,
        "danger-light-4": ElementColors.DANGER_LIGHT_4,
        "danger-light-5": ElementColors.DANGER_LIGHT_5,
        "danger-light-6": ElementColors.DANGER_LIGHT_6,
        "danger-light-7": ElementColors.DANGER_LIGHT_7,
        "danger-light-8": ElementColors.DANGER_LIGHT_8,
        "danger-light-9": ElementColors.DANGER_LIGHT_9,
        "danger-dark-1": ElementColors.DANGER_DARK_1,
        "danger-dark-2": ElementColors.DANGER_DARK_2,
        
        "info": ElementColors.INFO,
        "info-light-1": ElementColors.INFO_LIGHT_1,
        "info-light-2": ElementColors.INFO_LIGHT_2,
        "info-light-3": ElementColors.INFO_LIGHT_3,
        "info-light-4": ElementColors.INFO_LIGHT_4,
        "info-light-5": ElementColors.INFO_LIGHT_5,
        "info-light-6": ElementColors.INFO_LIGHT_6,
        "info-light-7": ElementColors.INFO_LIGHT_7,
        "info-light-8": ElementColors.INFO_LIGHT_8,
        "info-light-9": ElementColors.INFO_LIGHT_9,
        "info-dark-1": ElementColors.INFO_DARK_1,
        "info-dark-2": ElementColors.INFO_DARK_2,
        
        # 文本颜色
        "text-primary": ElementColors.TEXT_PRIMARY,
        "text-regular": ElementColors.TEXT_REGULAR,
        "text-secondary": ElementColors.TEXT_SECONDARY,
        "text-placeholder": ElementColors.TEXT_PLACEHOLDER,
        
        # 边框颜色
        "border-base": ElementColors.BORDER_BASE,
        "border-light": ElementColors.BORDER_LIGHT,
        "border-lighter": ElementColors.BORDER_LIGHTER,
        "border-extra-light": ElementColors.BORDER_EXTRA_LIGHT,
        
        # 填充颜色
        "fill-base": ElementColors.FILL_BASE,
        "fill-light": ElementColors.FILL_LIGHT,
        "fill-lighter": ElementColors.FILL_LIGHTER,
        "fill-extra-light": ElementColors.FILL_EXTRA_LIGHT,
        
        # 背景颜色
        "bg-base": ElementColors.BG_BASE,
        "bg-page": ElementColors.BG_PAGE,
        "bg-overlay": ElementColors.BG_OVERLAY,
        
        # 基础颜色
        "black": ElementColors.BLACK,
        "white": ElementColors.WHITE,
        "transparent": ElementColors.TRANSPARENT,
    },
    
    # 尺寸变量
    "sizes": {
        # 字体大小
        "font-size-extra-large": "20px",
        "font-size-large": "18px",
        "font-size-medium": "16px",
        "font-size-base": "14px",
        "font-size-small": "13px",
        "font-size-extra-small": "12px",
        
        # 边框圆角
        "border-radius-base": "4px",
        "border-radius-small": "2px",
        "border-radius-round": "20px",
        "border-radius-circle": "100%",
        
        # 边框宽度
        "border-width-base": "1px",
        "border-width-medium": "2px",
        "border-width-thick": "3px",
        
        # 间距
        "spacing-extra-large": "32px",
        "spacing-large": "24px",
        "spacing-medium": "20px",
        "spacing-base": "16px",
        "spacing-small": "12px",
        "spacing-extra-small": "8px",
        "spacing-mini": "4px",
        
        # 组件高度 (基于Element UI官方尺寸)
        "component-size-large": "40px",
        "component-size-default": "32px",    # Element UI默认尺寸
        "component-size-medium": "32px",     # 保持兼容
        "component-size-small": "28px",
        "component-size-mini": "24px",       # 更小的mini尺寸
        
        # 按钮特定尺寸
        "button-padding-large": "12px 19px",
        "button-padding-default": "8px 15px",
        "button-padding-small": "5px 11px", 
        "button-padding-mini": "1px 7px",
        
        # 按钮字体大小
        "button-font-size-large": "16px",
        "button-font-size-default": "14px",
        "button-font-size-small": "12px",
        "button-font-size-mini": "12px",
    },
    
    # 字体变量
    "fonts": {
        "font-family": '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
        "font-weight-primary": "500",
        "font-weight-secondary": "400",
        "line-height-primary": "24px",
        "line-height-base": "1.5",
    },
    
    # 阴影变量
    "shadows": {
        "box-shadow-base": "0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04)",
        "box-shadow-dark": "0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.12)",
        "box-shadow-light": "0 2px 12px 0 rgba(0, 0, 0, 0.1)",
    },
    
    # 过渡动画
    "transitions": {
        "transition-duration": "0.3s",
        "transition-duration-fast": "0.2s",
        "transition-function-ease-in-out-bezier": "cubic-bezier(0.645, 0.045, 0.355, 1)",
        "transition-function-fast-bezier": "cubic-bezier(0.23, 1, 0.32, 1)",
        "transition-all": "all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)",
    },
    
    # 组件特定配置
    "components": {
        "button": {
            # 基础配置
            "font-family": "Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,SimSun,sans-serif",
            "font-weight": "500",
            "border-width": "1px",
            "border-style": "solid",
            "cursor": "pointer",
            "box-sizing": "border-box",
            "outline": "none",
            "transition": "0.1s",
            "font-weight": "500",
            "user-select": "none",
            "vertical-align": "middle",
            "text-align": "center",
            "line-height": "1",
            "white-space": "nowrap",
            "appearance": "none",
            
            # 默认样式
            "height": "32px",
            "padding": "8px 15px", 
            "font-size": "14px",
            "border-radius": "4px",
            "min-width": "64px",
            
            # 尺寸变体
            "large": {
                "height": "40px",
                "padding": "12px 19px",
                "font-size": "16px",
            },
            "default": {
                "height": "32px", 
                "padding": "8px 15px",
                "font-size": "14px",
            },
            "small": {
                "height": "28px",
                "padding": "5px 11px", 
                "font-size": "12px",
            },
            "mini": {
                "height": "24px",
                "padding": "1px 7px",
                "font-size": "12px",
            },
            
            # 类型变体
            "default-colors": {
                "color": "#606266",
                "background-color": "#ffffff",
                "border-color": "#dcdfe6",
                "hover-color": "#409eff",
                "hover-background-color": "#ecf5ff", 
                "hover-border-color": "#c6e2ff",
                "active-color": "#409eff",
                "active-background-color": "#ecf5ff",
                "active-border-color": "#3a8ee6",
                "focus-border-color": "#409eff",
                "disabled-color": "#c0c4cc",
                "disabled-background-color": "#ffffff",
                "disabled-border-color": "#ebeef5",
            },
            "primary-colors": {
                "color": "#ffffff",
                "background-color": "#409eff",
                "border-color": "#409eff", 
                "hover-background-color": "#66b1ff",
                "hover-border-color": "#66b1ff",
                "active-background-color": "#3a8ee6",
                "active-border-color": "#3a8ee6",
                "disabled-color": "#ffffff",
                "disabled-background-color": "#a0cfff",
                "disabled-border-color": "#a0cfff",
            },
            "success-colors": {
                "color": "#ffffff",
                "background-color": "#67c23a",
                "border-color": "#67c23a",
                "hover-background-color": "#85ce61",
                "hover-border-color": "#85ce61", 
                "active-background-color": "#5daf34",
                "active-border-color": "#5daf34",
                "disabled-color": "#ffffff",
                "disabled-background-color": "#b3e19d",
                "disabled-border-color": "#b3e19d",
            },
            "warning-colors": {
                "color": "#ffffff", 
                "background-color": "#e6a23c",
                "border-color": "#e6a23c",
                "hover-background-color": "#ebb563",
                "hover-border-color": "#ebb563",
                "active-background-color": "#cf9236",
                "active-border-color": "#cf9236",
                "disabled-color": "#ffffff",
                "disabled-background-color": "#f3d19e",
                "disabled-border-color": "#f3d19e",
            },
            "danger-colors": {
                "color": "#ffffff",
                "background-color": "#f56c6c", 
                "border-color": "#f56c6c",
                "hover-background-color": "#f78989",
                "hover-border-color": "#f78989",
                "active-background-color": "#dd6161",
                "active-border-color": "#dd6161", 
                "disabled-color": "#ffffff",
                "disabled-background-color": "#fab6b6",
                "disabled-border-color": "#fab6b6",
            },
            "info-colors": {
                "color": "#ffffff",
                "background-color": "#909399",
                "border-color": "#909399",
                "hover-background-color": "#a6a9ad", 
                "hover-border-color": "#a6a9ad",
                "active-background-color": "#82848a",
                "active-border-color": "#82848a",
                "disabled-color": "#ffffff", 
                "disabled-background-color": "#c8c9cc",
                "disabled-border-color": "#c8c9cc",
            },
            
            # 朴素按钮样式
            "plain-default": {
                "color": "#409eff",
                "background-color": "#ecf5ff",
                "border-color": "#b3d8ff",
                "hover-color": "#ffffff",
                "hover-background-color": "#409eff", 
                "hover-border-color": "#409eff",
                "active-color": "#ffffff",
                "active-background-color": "#3a8ee6",
                "active-border-color": "#3a8ee6",
                "disabled-color": "#8cc5ff",
                "disabled-background-color": "#ecf5ff",
                "disabled-border-color": "#d9ecff",
            },
            "plain-primary": {
                "color": "#409eff",
                "background-color": "#ecf5ff", 
                "border-color": "#b3d8ff",
                "hover-color": "#ffffff",
                "hover-background-color": "#409eff",
                "hover-border-color": "#409eff",
                "active-color": "#ffffff", 
                "active-background-color": "#3a8ee6",
                "active-border-color": "#3a8ee6",
                "disabled-color": "#8cc5ff",
                "disabled-background-color": "#ecf5ff",
                "disabled-border-color": "#d9ecff",
            },
            "plain-success": {
                "color": "#67c23a",
                "background-color": "#f0f9ff",
                "border-color": "#c2e7b0",
                "hover-color": "#ffffff",
                "hover-background-color": "#67c23a",
                "hover-border-color": "#67c23a", 
                "active-color": "#ffffff",
                "active-background-color": "#5daf34",
                "active-border-color": "#5daf34",
                "disabled-color": "#a4da89",
                "disabled-background-color": "#f0f9ff", 
                "disabled-border-color": "#e1f3d8",
            },
            "plain-warning": {
                "color": "#e6a23c",
                "background-color": "#fdf6ec",
                "border-color": "#f5dab1",
                "hover-color": "#ffffff",
                "hover-background-color": "#e6a23c",
                "hover-border-color": "#e6a23c",
                "active-color": "#ffffff",
                "active-background-color": "#cf9236", 
                "active-border-color": "#cf9236",
                "disabled-color": "#f0c78a",
                "disabled-background-color": "#fdf6ec",
                "disabled-border-color": "#faecd8",
            },
            "plain-danger": {
                "color": "#f56c6c",
                "background-color": "#fef0f0", 
                "border-color": "#fbc4c4",
                "hover-color": "#ffffff",
                "hover-background-color": "#f56c6c",
                "hover-border-color": "#f56c6c",
                "active-color": "#ffffff",
                "active-background-color": "#dd6161",
                "active-border-color": "#dd6161",
                "disabled-color": "#f9a7a7",
                "disabled-background-color": "#fef0f0",
                "disabled-border-color": "#fde2e2",
            },
            "plain-info": {
                "color": "#909399",
                "background-color": "#f4f4f5",
                "border-color": "#d3d4d6", 
                "hover-color": "#ffffff",
                "hover-background-color": "#909399",
                "hover-border-color": "#909399",
                "active-color": "#ffffff",
                "active-background-color": "#82848a",
                "active-border-color": "#82848a",
                "disabled-color": "#bcbec2",
                "disabled-background-color": "#f4f4f5",
                "disabled-border-color": "#e9e9eb",
            },
        },
        "input": {
            "height": "40px",
            "padding": "0 15px",
            "font-size": "14px",
            "border-radius": "4px",
            "border-width": "1px",
        },
        "table": {
            "header-height": "48px",
            "row-height": "48px",
            "cell-padding": "12px 0",
            "border-width": "1px",
        },
        "form": {
            "label-height": "40px",
            "item-margin-bottom": "22px",
        },
    },
}

# =============================================================================
# Element UI 暗色主题配置
# =============================================================================

ELEMENT_DARK_THEME = {
    "name": "element-dark", 
    "description": "Element UI 暗色主题",
    "version": "1.0.0",
    
    # 继承默认主题的颜色，但覆盖背景和文本相关颜色
    "colors": {
        # 保持主要功能颜色不变
        **ELEMENT_DEFAULT_THEME["colors"],
        
        # 暗色主题特定颜色覆盖
        # 文本颜色（暗色主题）
        "text-primary": "#E5EAF3",      # 主要文本 - 亮色
        "text-regular": "#CFD3DC",      # 常规文本 - 中亮色  
        "text-secondary": "#A3A6AD",    # 次要文本 - 中色
        "text-placeholder": "#8D9095",  # 占位符文本 - 暗色
        
        # 边框颜色（暗色主题）
        "border-base": "#4C4D4F",       # 基础边框 - 暗色
        "border-light": "#414243",      # 浅色边框 - 更暗
        "border-lighter": "#363637",    # 更浅边框 - 很暗
        "border-extra-light": "#2B2B2C", # 极浅边框 - 极暗
        
        # 填充颜色（暗色主题）
        "fill-base": "#303133",         # 基础填充 - 暗灰
        "fill-light": "#262627",        # 浅色填充 - 深灰
        "fill-lighter": "#1D1D1F",      # 更浅填充 - 更深灰
        "fill-extra-light": "#191919",  # 极浅填充 - 极深灰
        
        # 背景颜色（暗色主题）
        "bg-base": "#1D1E1F",           # 基础背景 - 深色
        "bg-page": "#0A0A0A",           # 页面背景 - 黑色
        "bg-overlay": "#1D1E1F",        # 遮罩背景 - 深色
    },
    
    # 继承默认主题的尺寸
    "sizes": ELEMENT_DEFAULT_THEME["sizes"],
    
    # 继承默认主题的字体
    "fonts": ELEMENT_DEFAULT_THEME["fonts"],
    
    # 暗色主题特定阴影
    "shadows": {
        "box-shadow-base": "0 2px 4px rgba(0, 0, 0, 0.3), 0 0 6px rgba(0, 0, 0, 0.2)",
        "box-shadow-dark": "0 2px 4px rgba(0, 0, 0, 0.4), 0 0 6px rgba(0, 0, 0, 0.3)",
        "box-shadow-light": "0 2px 12px 0 rgba(0, 0, 0, 0.2)",
    },
    
    # 继承默认主题的过渡动画
    "transitions": ELEMENT_DEFAULT_THEME["transitions"],
    
    # 继承默认主题的组件配置
    "components": ELEMENT_DEFAULT_THEME["components"],
}

# =============================================================================
# 预定义主题注册表
# =============================================================================

BUILT_IN_THEMES = {
    "element-default": ELEMENT_DEFAULT_THEME,
    "element-dark": ELEMENT_DARK_THEME,
}

# 主题工具函数
def get_theme_by_name(theme_name: str) -> dict:
    """根据主题名称获取主题配置"""
    return BUILT_IN_THEMES.get(theme_name, ELEMENT_DEFAULT_THEME)

def get_available_themes() -> list:
    """获取可用主题列表"""
    return list(BUILT_IN_THEMES.keys())

def get_theme_color(theme_name: str, color_name: str, default: str = None) -> str:
    """获取指定主题的颜色值"""
    theme = get_theme_by_name(theme_name)
    return theme.get("colors", {}).get(color_name, default)

def get_theme_size(theme_name: str, size_name: str, default: str = None) -> str:
    """获取指定主题的尺寸值"""
    theme = get_theme_by_name(theme_name)
    return theme.get("sizes", {}).get(size_name, default)

# =============================================================================
# 全局主题变量访问器
# =============================================================================

class GlobalTheme:
    """全局主题变量访问器 - 提供便捷的主题变量访问方式"""
    
    _current_theme = "element-default"
    
    @classmethod  
    def set_current_theme(cls, theme_name: str):
        """设置当前主题"""
        if theme_name in BUILT_IN_THEMES:
            cls._current_theme = theme_name
    
    @classmethod
    def get_color(cls, color_name: str, default: str = None) -> str:
        """获取当前主题的颜色值"""
        return get_theme_color(cls._current_theme, color_name, default)
    
    @classmethod
    def get_size(cls, size_name: str, default: str = None) -> str:
        """获取当前主题的尺寸值"""
        return get_theme_size(cls._current_theme, size_name, default)
    
    @classmethod
    def get_font(cls, font_name: str, default: str = None) -> str:
        """获取当前主题的字体值"""
        theme = get_theme_by_name(cls._current_theme)
        return theme.get("fonts", {}).get(font_name, default)
    
    @classmethod
    def get_shadow(cls, shadow_name: str, default: str = None) -> str:
        """获取当前主题的阴影值"""
        theme = get_theme_by_name(cls._current_theme)
        return theme.get("shadows", {}).get(shadow_name, default)
    
    @classmethod
    def get_transition(cls, transition_name: str, default: str = None) -> str:
        """获取当前主题的过渡动画值"""
        theme = get_theme_by_name(cls._current_theme)
        return theme.get("transitions", {}).get(transition_name, default)

# 全局主题实例
Theme = GlobalTheme()